const {defineConfig} = require('@vue/cli-service')

const port = process.env.port || process.env.npm_config_port || 8082 // 端口

const webpack = require("webpack")

module.exports = defineConfig({
    transpileDependencies: true,
    lintOnSave: false,  //加上这个配置，忽略未使用 引入配置
    devServer: {
        host: '0.0.0.0',
        port: port,
        open: true,
        proxy: {
            '/': {
                target: 'http://localhost:9001',
                changeOrigin: true,
                ws: false,
                secure: false,
                pathRewrite: {'^/': ''}
            }
        },
    },
    // 配置插件参数
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                'window.Quill': 'quill'
            })
        ]
    }
})
